home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #3
/
Amiga Plus CD - 1996 - No. 3.iso
/
demo-versionen
/
databaseprofessional_v3.0
/
picbase
/
toprog.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-12-29
|
2KB
|
109 lines
/* Bild aus Clipart/PicBase an externes Programm übergeben */
ARG bild
OPTIONS RESULTS
ADDRESS DataBase
Request "PGS_3|_PPaint|_DPaint|_FinalWriter|_Clipboard|_Abbruch" "Bild an welches Programm übergeben ?"
req = RC
IF req = 0 THEN EXIT
Message "Bild wird übergeben ..."
/* PageStream 3 */
IF req = 1 THEN DO
pos = LastPos(".",bild)
IF pos > 0 THEN DO
filter = "FILTER "
ext = SubStr(bild,pos+1,Length(bild)-pos)
SELECT
WHEN ext = "IFF" THEN
filter = filter || "IFFILBM"
WHEN ext = "GIF" THEN
filter = filter || "GIF"
WHEN ext = "PCX" THEN
filter = filter || "PCX"
WHEN ext = "BMP" THEN
filter = filter || "BMP"
WHEN ext = "TIF" THEN
filter = filter || "TIFF"
WHEN ext = "JPG" THEN
filter = filter || "JPEG"
OTHERWISE
filter = ""
END
END
ELSE
filter = ""
ADDRESS 'PAGESTREAM'
PlaceGraphic FILE bild filter STATUS
IF RC ~= 0 THEN
ADDRESS DataBase Message "Bild kann nicht an PGS3 übergeben werden"
ELSE
ADDRESS DataBase Message "Bild an PGS3 übergeben"
END
/* PPaint 6.4 */
IF req = 2 THEN DO
Request "_Bild|_Pinsel|_Abbruch" "Als was soll das Bild geladen werden ?"
req2 = RC
IF RC = 0 THEN EXIT
MYPORT = 'PPAINT'
IF ~SHOW('P', MYPORT) THEN DO
IF EXISTS('PPaint:PPaint') THEN DO
ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
DO 30 WHILE ~SHOW('P',MYPORT)
ADDRESS COMMAND 'Wait >NIL: 1 SEC'
END
END
ELSE DO
EXIT
END
END
IF ~SHOW('P', MYPORT) THEN EXIT
ADDRESS VALUE MYPORT
Version 'REXX'
IF RESULT < 2 THEN DO
errmess = 'Ihr PPaint ist zu alt !'
ADDRESS DataBase Message errmess
EXIT
END
LockGUI
IF req2 = 1 THEN
LoadImage bild
ELSE
LoadBrush bild
UnlockGUI
ScreenToFront
ADDRESS DataBase Message "Bild an PPaint übergeben"
END
/* DPaint V */
IF req = 3 THEN DO
Request "_Ok" "Leider z.Zt. noch nicht verfügbar"
END
/* FinalWriter */
IF req = 4 THEN DO
ADDRESS FINALW.1
InsertImage bild /* POSITION 1 1 1 6 6 */ /* Page, Left, Top, Width, Height */
ScreenToFront
ADDRESS DataBase Message "Bild an FinalWriter übergeben"
END
/* Clipboard */
IF req = 5 THEN DO
CopyToClip bild
Message "Bildname ins Clipboard kopiert"
END